Other options in RStudio

Other git options in the Git panel

RStudio Git window
  • Diff opens Git window with output of git diff <file> of choosen file
  • Commit opens Git window is where we stage and commit changes to files
  • Pull does a git pull (also accessible from Git window)
  • Push does a git push (also accessible from Git window)
  • History opens a window with output of git log

Go directly to bash and don’t pass go

By now, you’ve exhausted git options in RStudio: use bash!

  • More menu allows access to git revert & add files to .gitignore
  • Create and checkout a Branch using buttons on the RHS

Install R on Windows

  • Visit the R website
  • Follow the links to download R, incl. select mirror and OS
  • Double click installer and follow instructions
  • Install required packages with install.packages()

R website

Install RStudio on Windows

  • Download RStudio installer
  • Double click installer and follow instructions

RStudio Desktop download page

Install git on Windows

  • Download git, currently v 2.45.2
  • Double click installer and follow instructions

Installation location

Note the location where git is installed, e.g.

C:\Users\{...}\AppData\Local\Programs\

  • Set git configurations, e.g., user.name, user.email, etc.

Initial git installer screen

Getting them to work together

  • git authentication is OS-specific - see David’s slides
  • Connect RStudio and git: Tools > Global Options… > Git/SVN

Connect RStudio and git